In a device-to-device (D2D) communication manner, devices can communicate with each other by using a particular mechanism without transit by a base station; therefore, communication can be implemented in a place where network facilities are inadequate or no network is available. However, during D2D communication, each device has a right and an opportunity to initiate communication, but stability of time and frequency of user equipment (UE) is poorer than that of a base station, and different UEs apply different time and frequency references. If each UE randomly transmits a synchronization signal, receiver UE will be unable to determine a synchronization reference, and as a result, communication cannot be established.
In a Long Term Evolution (LTE) system, a synchronization mechanism based on a two-step method is provided. The synchronization mechanism involves one primary synchronization signal (PSS) and one secondary synchronization signal (SSS). A cell identifier is allocated to a base station, and the PSS and the SSS are used to indicate the cell identifier. UE selects a serving cell after power-on and synchronizes to the selected serving cell by using the PSS and the SSS. That is, UEs that belong to different cells synchronize to different base stations. A synchronization method is: UE receives, by using a receiver, a PSS and an SSS that are sent by a base station and tracks the PSS and the SSS, and aligns time and frequency with that of a base station that provides a service for the UE. Base stations synchronize time and frequency to a unified synchronization source by using a global positioning system (GPS), or the like.
In an LTE downlink communication mechanism, in a cell, only one transmitter transmits a synchronization signal, and all UEs synchronize to the cell. However, in a D2D scenario, each UE may send a synchronization signal, and an LTE two-step synchronization mechanism does not suit such a distributed network structure of D2D. It can be seen that how to implement synchronization between devices in D2D communication is an issue to be resolved.